How to create XML File in asp.net
1573
04-Jan-2016
I want to use create XML File in asp.net .How will do this please help me.
Anonymous User
04-Jan-2016a
.NET contains number of classes that support XML.
ALl of these classes make working with XML as easy as understanding XML.
i am going to create xml using XmlTextWriter class.
The XmlTextWriter class allows you to write XML to a file.
This class contains number of methods and properties.
WriteStartDocument- Writes the XML declaration with the version "1.0".
WriteEndDocument- Closes any open elements.
Close- Closes the stream.
WriteStartElement- Writes the specified start tag.
WriteEndElement- Closes one element.
WriteStartAttribute- Writes the start of an attribute.
WriteEndAttribute- Closes the previous WriteStartAttribute call.
WriteString: Writes a string.
code behind
Result